<!--
 * @Author: your name
 * @Date: 2021-09-15 19:54:56
 * @LastEditTime: 2021-09-15 20:21:37
 * @LastEditors: Please set LastEditors
 * @Description: {{$st('wp_Repair_Inquiry')}}
 * @FilePath: \weplus_weibao_app\src\components\repairreport\RepairOrderQuery.vue
-->
<template>
    <van-tabs
        v-model:active="active"
        title-active-color="#009DFF"
        color="#009DFF"
        swipeable
    >
        <van-tab
            class="tab-panel"
            :title="$st('wp_Mobile_Number_of_requester')">
            <repair-query-phone />
        </van-tab>
        <van-tab
            class="tab-panel"
            :title="$st('wp_Factory_Number')">
            <repair-query-manucode />
        </van-tab>
    </van-tabs>
</template>
<script>
import { ref, onMounted } from 'vue';
import RepairQueryPhone from './repaircommon/RepairQueryPhone.vue';
import RepairQueryManucode from './repaircommon/RepairQueryManucode.vue';
import { useRoute } from 'vue-router';

export default {
    components: { RepairQueryPhone, RepairQueryManucode },
    setup () {
        const active = ref(0);
        const route = useRoute();
        const manufacturecode = ref('');
        onMounted(() => {
            if (route.query.manufacturecode) {
                manufacturecode.value = route.query.manufacturecode;
                active.value = 1;
            }
        });
        return { active };
    }
};
</script>
<style  scoped>
.tab-panel {
  background: #f0f3f7;
  background-image: url("../../../assets/tab_panel_back@2x.png");
}
</style>
